public class Test {


    public static void main(String[] args) {
        Stack stack = new Stack();

        stack.push(10);
        stack.push(20);
        stack.push(30);
        
        stack.push(40);


        System.out.println(stack.pop());
        System.out.println( "栈的大小为：" + stack.size());
        System.out.println(stack.pop());
        System.out.println( "栈的大小为：" + stack.size());

        System.out.println(stack.peek());

        System.out.println(stack.isEmpty());
    }

}
